#pragma once

#include <string>
#include <unistd.h>
#include "Log.h"

class Task
{
public:
    Task() = default; // 默认构造,支持任务的拷贝
    Task(int id)
    {
        task_name = "tash" + std::to_string(id);
    }

    void operator()()
    {
        LOG(zmh::LogLevel::INFO) << task_name << " Executing task";
        usleep(100000); // 固定100ms延迟
    }
private:
    std::string task_name;
};